package com.lzj.demo.design.visitor.user;

import com.lzj.demo.design.visitor.visitor.IVisitor;

import java.math.BigDecimal;

public class Teacher extends IUser {

    public Teacher(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(IVisitor visitor) {
        visitor.visit(this);
    }
    /**
     * 升学率
     * */
    public double enterRatio(){
        return BigDecimal.valueOf(Math.random()*100).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
    }
}
